﻿<UserControl x:Class="Tanmia.Warehouse.Presentation.Scenarios.StoreStructureEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:regions="http://www.codeplex.com/prism"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <ToolBar Grid.Row="0" Grid.Column="0">
            <Button Content="تحديث" Command="{Binding Path=RefreshCommand}" />
            <Button Content="إضافة" Command="{Binding Path=ShowStorageSectionEditor}" CommandParameter="{Binding ElementName=tvStoreTree, Path=SelectedItem}" />
        </ToolBar>
        <TreeView Name="tvStoreTree" ItemsSource="{Binding Path=TreeItems, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="0" />

        <ContentControl regions:RegionManager.RegionName="StorageSectionRegion" Grid.Row="1" Grid.Column="1" />
    </Grid>
</UserControl>
